package com.ucl.smarttask.client;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.RootLayoutPanel;
import com.ucl.smarttask.client.HeaderArea;
import com.ucl.smarttask.client.MainArea;
import com.ucl.smarttask.client.NavigationArea;
import com.smartgwt.client.widgets.layout.HLayout;
import com.smartgwt.client.widgets.layout.VLayout;

/**
 * Entry point classes define <code>onModuleLoad()</code>.
 */
public class SmartTask implements EntryPoint {
	
		private static final int HEADER_HEIGHT = 85;
	    
	    private VLayout mainLayout;
	    private HLayout northLayout;
	    private HLayout southLayout;
	    private VLayout eastLayout;
	    private HLayout westLayout;
	    
	    public void onModuleLoad() {
	    	
	        Window.enableScrolling(false);
	        
	        mainLayout = new VLayout();
	        mainLayout.setWidth100();
	        mainLayout.setHeight100();

	        northLayout = new HLayout();
	        northLayout.setHeight(HEADER_HEIGHT);
	        northLayout.addMember(new HeaderArea());

	        westLayout = new NavigationArea();
	        
	        eastLayout = new MainArea();
	        eastLayout.setWidth("80%");
	        
	        southLayout = new HLayout();
	        southLayout.setMembers(westLayout, eastLayout);

	        mainLayout.addMember(northLayout);
	        mainLayout.addMember(southLayout);
	        
	        RootLayoutPanel.get().add(mainLayout);
	}
}
